docs: add ClickHouse analytics blog post - #686
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 826f8383d1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
1 similar comment
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1996c46df4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d92254e45d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
|
@codex review |
A first-person post on how librechat.ai's analytics run on Plausible backed by ClickHouse, including the recent cloud-to-cloud cluster move. Adds two reusable blog components: AnalyticsArchitecture, a theme-aware data-flow diagram, and SiteStats, a server component that reads live numbers from the Plausible Stats API when PLAUSIBLE_STATS_API_KEY is set and falls back to a static snapshot otherwise. Includes the cover image and registers both components in mdx-components.
…ents Replace the cluster-migration walkthrough with the part readers actually care about: pointing a LibreChat agent at the ClickHouse data and asking it questions in plain English, the privacy stance behind it, and the ClickHouse partnership tie-in. The migration drops to a single line. Adds a prompts appendix and bumps Plausible to v3.2.1.
…gures Adds two screenshots from the actual LibreChat agent session: the tool calls and data provenance, and the Key Insights answer. Corrects every number in the summary table against that run (Wednesday not Monday, 21% weekend share, Docker at 4.4x npm, and so on), and covers the engagement_time data-quality problem the agent flagged on its own. Redates the post to its publication date so it matches the date range visible in the transcript, renaming the post and its images to suit.
The floppy-disk comparison was wrong: 28 MiB needs about twenty 1.44 MB disks, not half of one. Swapped it for a CD, which holds the dataset roughly twenty times over. Blog posts are prerendered from generateStaticParams, and the SiteStats fallback performs no fetch, so a post embedding it was baked at build with no revalidation and a Plausible key added later could never take effect. Sets revalidate on the blog route so those pages regenerate hourly.
The shared blog rule pins every /blog document at s-maxage=86400, so the CDN could serve day-old numbers on a post that presents them as live, regardless of how often the origin regenerated. Adds a narrower rule for those paths at s-maxage=3600 to match the route's revalidate, keeping the RSC split so flight payloads stay uncacheable.
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
43007c7 to
2e938d5
Compare
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
What
Adds a blog post on how the LibreChat website's analytics are built: Plausible for the privacy-friendly front end, ClickHouse as the storage engine underneath, and a walkthrough of the recent move between ClickHouse Cloud clusters.
The post lives at
/blog/2026-06-25_clickhouse-analyticsand is written first-person to match the existing ZimaCube post.New components
AnalyticsArchitecture— a theme-aware, accessible data-flow diagram (browser → Plausible CE → ClickHouse Cloud, with Postgres and the Core Web Vitals store as satellites). Pure layout, no image asset.SiteStats— an async server component. WhenPLAUSIBLE_STATS_API_KEYis set it queries the Plausible Stats API v2 at request time (cached one hour) and shows real visitor/pageview/visit numbers. Without the key it renders a dated static snapshot, so local dev, previews, and forks always build. The key stays server-side and never reaches the client.Both are registered in
lib/mdx-components.tsx. A 1200×630 cover image is included.Enabling live stats (optional)
PLAUSIBLE_STATS_API_KEYPLAUSIBLE_SITE_IDlibrechat.aiPLAUSIBLE_BASE_URLhttps://plausible.librechat.aiTesting
pnpm typecheckandpnpm lintpass.Note
No connection strings, hostnames, IPs, or credentials from the actual migration appear in the post or anywhere in this change.